package cn.itcast.service.impl;

import cn.itcast.dao.cargo.ChatLogDao;
import cn.itcast.domain.cargo.ChatLog;
import cn.itcast.domain.cargo.ChatLogExample;
import cn.itcast.service.ChatLogService;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
public class ChatLogServiceImpl implements ChatLogService {

    @Autowired
    private ChatLogDao chatLogDao;

    @Override
    public List<ChatLog> findAll(ChatLogExample example) {
        System.out.println(example);
        System.out.println(chatLogDao);
        List<ChatLog> list = chatLogDao.selectByExample(example);
        return list;
    }

    @Override
    public void save(ChatLog chatLog) {
        chatLogDao.insert(chatLog);
    }
}
